package com.bwie.system.service.impl;

import org.apache.commons.lang.StringUtils;
import org.springframework.stereotype.Service;
import java.util.Map;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.bwie.common.utils.PageUtils;
import com.bwie.common.utils.Query;

import com.bwie.system.dao.ShopDao;
import com.bwie.system.entity.ShopEntity;
import com.bwie.system.service.ShopService;


@Service("shopService")
public class ShopServiceImpl extends ServiceImpl<ShopDao, ShopEntity> implements ShopService {


    @Override
    public PageUtils queryPage(Map<String, Object> params) {
        QueryWrapper<ShopEntity> w = new QueryWrapper<>();

        String shopName=(String)params.get("shopName");
        if (shopName!=null&&shopName!=""){
            w.eq("shop_name",shopName);
        }
        IPage<ShopEntity> page = this.page(
                new Query<ShopEntity>().getPage(params),
                w
        );

        return new PageUtils(page);
    }

}